<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Key管理</title>
	<link rel="stylesheet" href="css/xingchao.css">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/layer/layer.js"></script>
    <script type="text/javascript" src="js/jquery.page.js"></script>
   
</head>
<body style="background: #EFEFEF; ">

<!--  
	头部
-->

<div class="head">
	<div class="w" style="height:50px;">
		<a href="index.html">
			<img src="images/logo.png" alt="" width="150px;">
		</a>
		<ul class="nav r">
	       <li class="cur">
	            <a href="index.html">众源</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="ziyuan.html">资源搜索</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="jiaocheng.html">使用教程</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="biaozhun.html">行业API</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="page.html">关于我们</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="user.html" id="user-box">会员中心</a>|
                 <a href="user.html?action=out">退出</a>
	        <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="">中文</a>|
	            <a href="">English</a>
	            <sub class="sub1"></sub>
	        </li>
		</ul>
	</div>
</div>

<div class="main w">
<!--  
	当前位置
-->
	<div class="position">
		您当前位置：<a href="">首页</a> > <a href="">Key管理</a>
	</div>
<!--  
	会员信息
-->
	<div class="user">
		<div class="user_left l">
			<div class="left_t">会员中心</div>
			<ul class="left_c">
				<li><a href="agent.html">我的收藏</a></li>
               
                <li><a href="user.html">资料修改</a></li>
				 <li><a href="editpwd.html">修改密码</a></li>
                 <li><a href="key.html" style="color: #5fadfc;">Key管理</a></li>
                
			</ul>
		</div>
		<div class="user_right r">
			<div class="right_t">Key管理</div>
			<div class="right_c">

				<ul class="key">
					<li>
						<b>当前有效产品：</b>
						 <span id="product_name"></span>
					</li>
					<li>
						<b>有效期至：</b>
						<span id="end_date"></span>
					</li>
					<li>
						<b>产品模块列表：</b>
					</li>
						<table class="table" style="text-align: center">
							<thead>
								<tr>
									<td>No.</td>
									<td>模块名</td>
								</tr>
							</thead>
							<tbody id="model_name">
								
								
							</tbody>
						</table>

					</li>
					<li>
						<button type="button" class="btn btn-primary">购买/升级产品</button>
					</li>	
				</ul>


			</div>
		</div>
	</div>
	<div class="clear"></div>
</div>
<!--  
	底部
-->
<div class="copyright">
	Copyright @ 2016-2017 蚂蚁金融服务集团  沪ICP备16046581号-1 
 &nbsp;&nbsp;&nbsp;&nbsp;技术支持：星巢网络
</div>
</div>
</body>
</html>

<script type="text/javascript" src="js/App.min.js"></script>
<script type="text/javascript">
function getLicense(){
	
	  var url = "http://www.usources.cn/api/user/license";
	   var loading = layer.msg('正在获取授权，请等候...', {icon: 16,time: 999999, shade: [0.3, '#000']});
	   $.ajax({
		  url:url+'?'+Math.random(),
		  type:'GET',
		   xhrFields: {
		   withCredentials: true
		  },
		  crossDomain:true,
		  data:{jsonpCallback:'license'},
		  success:function(data){
			   layer.close(loading);
			   if(data.code==200){
				   var datas  = data.data.info;
				   $('#product_name').html(datas.name);
				  
				   $('#end_date').html(datas.endDate);
				   var option = '';
				   if(datas.moduleNames.length==1){
					   option +='<tr><td>1</td><td>'+datas.moduleNames[0]+'</td></tr>';
				   }
				   $('#model_name').empty().append(option);
			   }else{
				   layer.msg('未知code的错误！',{icon:2});
			   }
			  
		  },dataType:'json'});
	 
}
function timeStamp( second_time ){  
  
var time = parseInt(second_time) + "秒";  
if( parseInt(second_time )> 60){  
  
    var second = parseInt(second_time) % 60;  
    var min = parseInt(second_time / 60);  
    time = min + "分" + second + "秒";  
      
    if( min > 60 ){  
        min = parseInt(second_time / 60) % 60;  
        var hour = parseInt( parseInt(second_time / 60) /60 );  
        time = hour + "小时" + min + "分" + second + "秒";  
  
        if( hour > 24 ){  
            hour = parseInt( parseInt(second_time / 60) /60 ) % 24;  
            var day = parseInt( parseInt( parseInt(second_time / 60) /60 ) / 24 );  
            time = day + "天" + hour + "小时" + min + "分" + second + "秒";  
        }  
    }  
      
  
}  
  
return time;          
}
getLicense();
</script>